package com.thinkwide.data.aop;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class MFAOPRun {

    public static void main(String[] arg) throws Throwable {
        MFAOPInterface businessImp = new MFAOPBussiness();
        InvocationHandler handler = new MFAOPLog(businessImp);

        MFAOPInterface proxy = (MFAOPInterface) Proxy.newProxyInstance(
                businessImp.getClass().getClassLoader(), businessImp.getClass().getInterfaces(), handler);

        proxy.beforeProcess("");
        proxy.afterProcess("");

    }
}
